package com.sanpu.kxe.business.card.adapter;

import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.sanpu.kxe.base.BaseFragment;
import com.sanpu.kxe.business.card.fragment.BankListFragment;
import com.sanpu.kxe.business.card.fragment.CreditCardListFragment;
import com.sanpu.kxe.common.interfaces.CommonConfig;

import java.util.ArrayList;

/**
 * Description：我的银行卡
 * Created by 薛勇军 on 2018/7/16.
 */

public class MyBankListAdapter extends FragmentPagerAdapter {

    ArrayList<BaseFragment> fragments = new ArrayList<>();

    public MyBankListAdapter(FragmentManager fm) {
        super(fm);
        fragments.add(new CreditCardListFragment());
        fragments.add(BankListFragment.getInstance(CommonConfig.DEPOSIT_CARD_TYPE));
//        fragments.add(BankListFragment.getInstance(CommonConfig.CREDIT_CARD_TYPE));
    }

    @Override
    public BaseFragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return "";
    }
}
